// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store';
import moment from 'moment';
import Element from 'element-ui';

Vue.config.productionTip = false;
Vue.prototype.$moment = moment;

/*引入全局css*/
import '../static/css/main.css';

/* use iview*/
import iView from 'iview';
import 'element-ui/lib/theme-chalk/index.css';
import 'iview/dist/styles/iview.css';

Vue.use(Element);
Vue.use(iView);

/*全局加载axios拦截器---配置axios的原型链*/
import './axios/axios';

// eslint-disable-next-line no-unused-vars
/*global date format*/
// import {
//     dateStr
// } from "./tool/tool";

import i18n from '../static/lang/i18n';

Vue.use(iView, {
	i18n: (key, value) => i18n.t(key, value)
});

// 引入vue-photo-previe
import preview from 'vue-photo-preview';
import 'vue-photo-preview/dist/skin.css';
// import M from 'minimatch';
Vue.use(preview);

/* eslint-disable no-new */
new Vue({
	el: '#app',
	router,
	i18n,
	store,
	components: {
		App
	},
	template: '<App/>'
});
